package com.zhs.study.pojo;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * @author zhenghuisheng
 * @date : 2023/5/30
 */
@Component
public class Context implements ApplicationContextAware {
    private ApplicationContext applicationContext;
    //实现方法
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
    }
    //将值返回
    public ApplicationContext getApplicationContext(){
        return applicationContext;
    }
}
